# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=perl-mime-lite
_pkgreal=MIME-Lite
pkgver=3.031
pkgrel=1
pkgdesc="low-calorie MIME generator"
url="https://metacpan.org/release/MIME-Lite"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
cpandepends="perl-mime-types perl-email-date-format
	perl-mailtools perl-test-pod-coverage"
depends="perl $cpandepends"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RJ/RJBS/MIME-Lite-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	cd "$builddir"
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="0fd57414a685f33d6fcc6d3c0dc2ae8556c7a7b2f5e05021af072bea48561b5bf89de49cbcc90328087e0cb46382e7cbccd60f8d5a9328f1e484afca502ca420  MIME-Lite-3.031.tar.gz"
